//
//  StandarModel.m
//  Youhuiju
//
//  Created by 余尚飞 on 16/8/16.
//  Copyright © 2016年 yutenys. All rights reserved.
//

#import "StandarModel.h"

@implementation standardClassInfo
+(instancetype)StandardClassInfoWith:(NSString *)classId andStandClassName:(NSString *)className
{
    
    return [[self alloc]initWithClassId:classId andStandClassName:className];
}

-(instancetype)initWithClassId:(NSString *)classId andStandClassName:(NSString *)className
{
    self = [super init];
    
    if (self) {
        
        
        self.standardClassId = classId;
        self.standardClassName = className;
        
    }
    
    return self;
}


//+(instancetype)StandardClassInfoWith:(NSArray *)array
//{
//    return [[self alloc]initWithClassId:array];
//}
//
//-(instancetype)initWithClassId:(NSArray *)array
//{
//    self = [super init];
//    if (self)
//    {
//        for (int i = 0; i < array.count; i++)
//        {
//            self.standardClassId = [NSString stringWithFormat:@"%zd",i];
//            self.standardClassName = array[i];
//        }
//    }
//    return self;
//}


-(void)setStandardClassId:(NSString *)standardClassId
{
    _standardClassId = [NSString stringWithFormat:@"%@",standardClassId];
}

@end

@implementation StandardModel


+(instancetype)StandardModelWith:(NSMutableArray<standardClassInfo *>*)classinfo andStandName:(NSString *)standName
{
    return [[self alloc] initWithClassInfo:classinfo andStandName:standName];
}

-(instancetype)initWithClassInfo:(NSMutableArray<standardClassInfo *> *)classinfo andStandName:(NSString *)standName
{
    self = [super init];
    
    if(self)
    {
        self.standardClassInfo = classinfo;
        self.standardName = standName;
        
    }
    return self;
}



@end
